﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;

namespace Uinside.CreditSystem.DomainModels.Models
{
    public class Employee :BaseModel
    {
        private string _userName;
        [StringLength(20)]
        public string UserName
        {
            get { return _userName; }
            set
            {
                SetField(ref _userName, value, "UserName");
            }
        }

        private string _password;
        [StringLength(20)]
        public string Password
        {
            get { return _password; }
            set
            {
                SetField(ref _password, value, "Password");
            }
        }

        private int _roleId;
        public int RoleId
        {
            get { return _roleId; }
            set { SetField(ref _roleId, value, "RoleId"); }
        }

        private Setting _role;
        [ForeignKey("RoleId")]
        public virtual Setting Role
        {
            get { return _role; }
            set
            {
                SetField(ref _role, value, "Role");
            }
        }
    }
}
